package com.yf.vip.controller;


import com.yf.vip.dto.UserVipDTO;
import com.yf.vip.service.UserVipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/vip")
public class UserVipController {

    @Autowired private UserVipService userVipService;

    @RequestMapping(value = "/{uid}", method = RequestMethod.GET)
    @ResponseBody
    public ResponseEntity getVipLevel(@PathVariable int uid) {

        UserVipDTO userVipDTO = userVipService.getUserVipByUid(uid);

        return ResponseEntity.ok(userVipDTO);
    }
}
